<!doctype html>
<html class="no-js fixed-layout">
<head>
<% include("/common/shop_head.html"){}%>
<script type="text/javascript">
$().ready( function() {
  
  // 删除
  $(".deleteReceiver").click( function() {
    if (confirm("您确定要删除吗？") == false) {
      return false;
    }
  });
  
});
</script>
</head>
<body>
<%include("/shop/header.html"){}%>
<div class="am-cf shop-main">
  <!-- sidebar start -->
  <%include("/shop/sidebar.html"){}%>
  <!-- sidebar end -->

  <!-- content start -->
  <div class="shop-content">
    <div class="shop-content-body">
      <ol class="am-breadcrumb am-margin-left am-margin-bottom-0">
        <li><span class="am-icon-info-circle am-icon-fw"> </span>个人资料</li>
        <li class="am-active">收货地址</li>
      </ol>
      
      <a class="am-btn am-btn-primary am-btn-xs am-margin-left-sm" href="${base}/receiver/add">添加地址</a>
      
      <div class="am-panel am-panel-default am-text-xs am-margin-sm">
        <div class="am-panel-bd am-g am-padding-0 am-scrollable-horizontal">
          <table class="am-table am-table-bordered am-table-striped am-table-hover am-text-nowrap am-text-xs am-margin-bottom-0">
            <thead>
              <tr>
                <th>收货人</th>
			    <th>地址</th>
				<th>电话</th>
				<th>手机</th>
				<th>邮编</th>
				<th>默认</th>
				<th>操作</th>
              </tr>
            </thead>
            <tbody>
              <%for(list in receiver){%>
			  <tr>
			    <td>${list.name}</td>
				<td>${list.address}</td>
				<td>${list.phone}</td>
				<td>${list.mobile}</td>
				<td>${list.zipCode}</td>
				<td>
                  <%if (list.isDefault){%>是<%}else{%>否<%}%>
				</td>
				<td>
				  <a href="${base}/receiver/edit?id=${list.id}">编辑</a>
				  <a href="${base}/receiver/delete/?id=${list.id}" class="deleteReceiver">删除</a>
				</td>
			  </tr>
			  <%}%>
            </tbody>
          </table>
          <%if (pager.list.~size == 0){%>
          <div class="am-kai am-text-center am-margin">
            <h3>没有找到任何记录!</h3>
          </div>
          <%}%>
        </div>
      </div>
      <%include("/shop/pager.html", {"pageNumber":pager.pageNumber,"pageSize":pager.pageSize,"pageCount":pager.totalPage,"property":"","keyword":"无","orderBy":"","orderType":"","baseUrl":"/receiver/list"}) {}%>
    </div>
    <%include("/shop/footer.html"){}%>
  </div>
  <!-- content end -->
</div>
</body>
</html>